import request from '@/utils/request'

// 查询菜品管理列表
export function listDish(query) {
  return request({
    url: '/manage/dish/list',
    method: 'get',
    params: query
  })
}

// 查询菜品管理详细
export function getDish(dishId) {
  return request({
    url: '/manage/dish/' + dishId,
    method: 'get'
  })
}

// 新增菜品管理
export function addDish(data) {
  return request({
    url: '/manage/dish',
    method: 'post',
    data: data
  })
}

// 修改菜品管理
export function updateDish(data) {
  return request({
    url: '/manage/dish',
    method: 'put',
    data: data
  })
}

// 删除菜品管理
export function delDish(dishId) {
  return request({
    url: '/manage/dish/' + dishId,
    method: 'delete'
  })
}

// 获取所有分类列表(不分页)
export function listAllCategory() {
  return request({
    url: '/manage/category/all',
    method: 'get'
  })
}

// 获取所有部门列表(不分页)
export function listAllDepartment() {
  return request({
    url: '/manage/department/all',
    method: 'get'
  })
}
